<h1>Lista naloga</h1>
<div class="elementFilter">
    <form action="<?php echo url_for('nalog/index') ?>" method="post">
     <table ><tr>
    <?php echo $filter ?>

         </tr><td colspan="5" align="center">    <input  type="submit" value="Pošalji"> </td></tr>
       </table>
        </form>

</div>
<table id="rounded-corner">
  <thead>
    <tr>
   
        <th class="rounded-company">Datum realizacije</th>
      <th>Odgovorno lice</th>
      <th>Narudžbina</th>
      <th class="rounded-qend"> Faktura </th>
    </tr>
  </thead>
    <tfoot>
    	<tr>
        	<td colspan="" class="rounded-foot-left">&nbsp;</td>
                <td colspan="2" ><em> <?php if ($pager->haveToPaginate()): ?>
  <?php echo link_to('&laquo;', 'nalog/index?page='.$pager->getFirstPage()) ?>
  <?php echo link_to('&lt;', 'nalog/index?page='.$pager->getPreviousPage()) ?>
  <?php $links = $pager->getLinks(); foreach ($links as $page): ?>
    <?php echo ($page == $pager->getPage()) ? $page : link_to($page, 'nalog/index?page='.$page) ?>
    <?php if ($page != $pager->getCurrentMaxLink()): ?> - <?php endif ?>
  <?php endforeach ?>
  <?php echo link_to('&gt;', 'nalog/index?page='.$pager->getNextPage()) ?>
  <?php echo link_to('&raquo;', 'nalog/index?page='.$pager->getLastPage()) ?>
<?php endif ?>
 
</em></td>                    
        	<td class="rounded-foot-right"> &nbsp</td>
        </tr>
    </tfoot>

  <tbody>
    <?php foreach ($nalog_prodaje_list as $nalog_prodaje): ?>
    <tr>
      <td><?php echo $nalog_prodaje->getDatumRealizacije() ?></td>
      <td><?php echo $nalog_prodaje->getAdmin()->getIme() ?></td>
      <td><a href="<?php echo url_for1('narudzbina/index?id='.$nalog_prodaje->getNarudzbinaId()) ?>"><?php echo $nalog_prodaje->getNarudzbina()->getKupac()->getIme()."  -  ".$nalog_prodaje->getNarudzbina()->getDatumNarudzbine() ?></a></td>
      <td>
                <?php if($nalog_prodaje->getNarudzbina()->getStatusId()=="4") echo button_to('Fakturiši', 'faktura/new?id='.$nalog_prodaje->getId());
                else echo button_to('Faktura ', 'faktura/index?id='.$nalog_prodaje->getId())?>


            </td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  